﻿using movie.tool.library.binding;

namespace movie.tool.module.film.model
{
    public class MovieParam : NotifyPropertyChanged
    {
        private string name;
        private string author;
        private string[] tag;
        private string brief;
        private int minPlayers = 3;
        private int maxPlayers = 5;
        private float duration;
        /// <summary>
        /// 名称
        /// </summary>
        public string Name
        {
            get => name;
            set
            {
                name = value;
                SendPropertyChanged(nameof(Name));
            }
        }
        /// <summary>
        /// 作者
        /// </summary>
        public string Author
        {
            get => author;
            set
            {
                author = value;
                SendPropertyChanged(nameof(Author));
            }
        }
        /// <summary>
        /// 标签数组
        /// </summary>
        public string[] Tag
        {
            get => tag;
            set
            {
                tag = value;
                SendPropertyChanged(nameof(Tag));
            }
        }
        /// <summary>
        /// 简介
        /// </summary>
        public string Brief
        {
            get => brief;
            set
            {
                brief = value;
                SendPropertyChanged(nameof(Brief));
            }
        }
        /// <summary>
        /// 最少玩家数量
        /// </summary>
        public int MinPlayers
        {
            get => minPlayers;
            set
            {
                minPlayers = value;
                SendPropertyChanged(nameof(MinPlayers));
            }
        }
        /// <summary>
        /// 最大玩家数量
        /// </summary>
        public int MaxPlayers
        {
            get => maxPlayers;
            set
            {
                maxPlayers = value;
                SendPropertyChanged(nameof(MaxPlayers));
            }
        }
        /// <summary>
        /// 持续时长
        /// </summary>
        public float Duration
        {
            get => duration;
            set
            {
                duration = value;
                SendPropertyChanged(nameof(Duration));
            }
        }

        public void NotifyTagsChanged()
        {
            SendPropertyChanged(nameof(Tag));
        }
    }
}
